

class Solution(object):
    def containsDuplicate(self, nums):
        """
        :type nums: List[int]
        :rtype: bool
        """
        # res = []
        # for i in nums:
        #     if i in res:
        #         return True
        #     else:
        #         res.append(i)
        # return False
        return len(nums) != len(set(nums))


if __name__ == '__main__':
    sol = Solution()
    sol.containsDuplicate([1, 2, 3, 4, 5, 1])